"""
@Project:p7_2109
@File:task.py
@Author:马可
@Date:下午 03:12
""" 

from ronglian_sms_sdk import SmsSDK

from celery_tasks.main import app
accId = '8a216da86560c0cd0165797b9bdd0cc0'
accToken = 'd262f98fae4c43c5b02a2ffd242b9d45'
appId = '8aaf07087de13e49017dff9ee25706b0'

@app.task
def sms_code(mobile,code):
    tid = '1'
    datas = (code, '5')
    rest = SmsSDK(accId, accToken,appId).sendMessage(tid, mobile, datas)
    return rest